package com.sos.controller;

import com.sos.model.vo.ResultVO;
import com.sos.service.WebSocketService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/websocket")
@RequiredArgsConstructor
@Tag(name = "WebSocket接口", description = "WebSocket连接相关接口")
@Slf4j
public class WebSocketController {
    
    private final WebSocketService webSocketService;
    
    @GetMapping("/info")
    @Operation(summary = "WebSocket连接地址", description = "WebSocket连接地址: /websocket?token=Bearer {token}")
    public ResultVO<?> getWebSocketInfo() {
        return ResultVO.success("WebSocket连接地址: /api/websocket?token=Bearer {token}");
    }
}